<?php $id = getID();?>
<form method="post" action="<?php _actionUrl($this);?>" onsubmit="return ajax_form(this)">
<?php if( get('redirect') ): ?>
<input type="hidden" name="redirect" value="<?php _e(get('redirect'));?>"/>
<?php endif;?>
<!--LIST CUS-->
<div class="x-form-label" style="background:#fff;text-align:left;padding:5px 0px;display:block">Chọn công ty:</div>
<div style="padding:5px 0px">

<?php 
	_e(tpl_auto_select(array(
		name	=> 'customer_id[]',
		type 	=>  'automutiply',
		url 	=>	baseUrl().'/Crm/Helper/Customer',
		title	=>	'name',
		link 	=> 	'#Crm/Customer/View?ID=',
		items	=>	$this->get('customers'),
		style	=>  'style="width:700px!important"'
	)));
?></div>

<div class="tab-container">
	<div class="tab-bar">
		<a class="tab-link tab-link-first tab-link-active" onclick="do_tab(this,1)">Giao dịch</a>
		<a class="tab-link" onclick="expand_tab(this,'Giao dịch')">+
			<!--
			<div class="tab">
			<div class="x-form-container">
			<table width="100%" cellpadding="4" class="x-form">
				<tr>
					<td class="x-form-label" style="width:133px">Tiêu đề: </td>
					<td>
						<input class="x-text" type="text" name="title[]" style="width:300px;"/>
					</td>
				</tr>
				
					<tr>
						<td class="x-form-label">Loại giao dịch: </td>
						<td>
							<select name="parent_id[]" class="x-select">
							<?php foreach( $this->get('cats') as $a ):?>
							<option value="<?php _e($a['ID']);?>"><?php _e($a['title']);?></option>
							<?php endforeach;?>
							</select>
						</td>
					</tr>

					<tr>
						<td class="x-form-label">Ngày:</td>
						<td>
							<input type="text" name="date[]" onclick="date_picker(this,{format: 'd/m/Y' })" class="x-text x-date"/>
						</td>
					</tr>
				
					<tr>
						<td valign="top" class="x-form-label">Mô tả: </td>
						<td>
							<textarea class="x-text" name="desc[]" style="width:500px;height:100px"></textarea>
						</td>
					</tr>
					
					<tr>
						<td></td>
						<td>
							<input type="submit" value="Xác Nhận" class="x-button x-save"/>
							<a onclick="$(this).parent('.lightbox').remove()" class="x-button x-fresh">Hủy bỏ</a>
						</td>
					</tr>
			</table></div>
			</div>-->
		</a>
		<span class="clear"></span>
	</div>
<div class="tabs">	
<div class="tab tab-active">
	<div class="x-form-container">
		<table width="100%" cellpadding="4" class="x-form">
			<tr>
				<td class="x-form-label" style="width:133px">Tiêu đề: </td>
				<td>
					<input class="x-text" type="text" name="title[]" style="width:300px;"/>
				</td>
			</tr>
			
				<tr>
					<td class="x-form-label">Loại giao dịch: </td>
					<td>
						<select name="parent_id[]" class="x-select">
						<?php foreach( $this->get('cats') as $a ):?>
						<option value="<?php _e($a['ID']);?>"><?php _e($a['title']);?></option>
						<?php endforeach;?>
						</select>
					</td>
				</tr>

				<tr>
					<td class="x-form-label">Ngày:</td>
					<td>
						<input type="text" name="date[]" onclick="date_picker(this,{format: 'd/m/Y' })" class="x-text x-date"/>
					</td>
				</tr>
			
				<tr>
					<td valign="top" class="x-form-label">Mô tả: </td>
					<td>
						<textarea class="x-text" name="desc[]" style="width:500px;height:100px"></textarea>
					</td>
				</tr>
				
				<tr>
					<td></td>
					<td>
						<input type="submit" value="Cập nhật" class="x-button x-save"/>
						<a onclick="$(this).parent('.lightbox').remove()" class="x-button x-fresh">Hủy bỏ</a>
					</td>
				</tr>
		</table>
	</div>
</div>	
</form>
